/* 
 * File:   utf16encode.h
 * Author: Luis Aguirre
 * Description: 
 *
 * Created on 2 de agosto de 2013, 09:47 AM
 */

#ifndef UTF16ENCODE_H
#define	UTF16ENCODE_H

#include <string>
#include "../exceptions/openfileexception.h"
#include "../exceptions/fileexception.h"
#include "../exceptions/filenotfoundexception.h"
#include "../exceptions/utf8exception.h"

class Converter
{
public:
    Converter();
    
    std::string utf8ToUtf16(std::string filePath) throw(Utf8Exception);
    void writeText(std::string data, std::string output) throw(OpenFileException);
private:
    std::string readFile(std::string filePath)throw (FileException);
    long getUniCode(const std::string& str, const int& since, const short& toRead);
};

#endif	/* UTF16ENCODE_H */

